package com.edu.contorller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {


    @RequestMapping("/login")
    public String login(){
        System.out.println("执行了登录方法");
        // 在Controller里的方法中 return "/" 项目根路径
        return "forward:/index.jsp";
    }

    @RequestMapping("/register")
    public String register(){
        System.out.println("执行了注册方法");
        return "redirect:/register.jsp";
    }
}
